import { api } from '@/api/request'
import type { LoginForm, RegisterForm } from '@/types'

// 认证相关 API
export const authApi = {
  // 用户登录
  login: (data: LoginForm) => 
    api.post<{ access_token: string; token_type: string }>('/auth/login', data),
  
  // 用户注册
  register: (data: RegisterForm) => 
    api.post<{ access_token: string; token_type: string }>('/user/create', data),
}